import request from '@/utils/request';

// 获取分类列表
export async function reqCategorys({ payload }): Promise<any> {
  return request('/api/manage/category/list', {
    ...payload,
  });
}

// 添加分类
export async function reqAddCategory({ payload }): Promise<any> {
  return request('/api/manage/category/add', {
    method: 'POST',
    ...payload,
  });
}

// 修改分类
export async function reqUpdateCategory({ payload }): Promise<any> {
  return request('/api/manage/category/update', {
    method: 'POST',
    ...payload,
  });
}
